package com.winexpress.order;

import com.winexpress.entity.Wine;
import com.winexpress.session.order.SalesSessionBean;
import java.util.List;
import javax.ejb.EJB;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

@WebService(serviceName = "SalesManagementWS")
public class SalesManagementWS {
    
    @EJB
    private SalesSessionBean salesSessionBean;
//    
//    @WebMethod(operationName = "addSales")
//    public boolean addSales(@WebParam(name = "wine") Wine w, @WebParam(name = "quantity") int q ) {
//        boolean flag = salesSessionBean.addSales(w,q);
//        return flag;
//    }
//    
    @WebMethod(operationName = "getTopSellers")
    public List<Wine> getTopSellers(){
        return (List<Wine>)salesSessionBean.getTopSellers();
    }

}